*      The "is abstract" clause makes a class non-instantiable, like a static
*      class in C#. This clause is a non-standard language extension.

       class-id. Commands as "Barbarian.Commands" is abstract.

       environment division.
       configuration section.
       repository.
           class RoutedCommand as "System.Windows.Input.RoutedCommand"
           class MainWindow as "Barbarian.MainWindow"
           class SysType as "System.Type"
           .      

*      Between "factory" and "end factory", we define members of class scope.
*      These members belong only to the class, and not to any instance.
              
       factory.
       data division.
       working-storage section.
       
*      We emulate C# public readonly fields using private fields and public
*      read-only properties. Here are the private fields:

       01  _compileAndRun RoutedCommand value new RoutedCommand(
               "Compile", SysType::"GetType"("Barbarian.MainWindow")).

       01  _export RoutedCommand value new RoutedCommand(
               "Export", SysType::"GetType"("Barbarian.MainWindow")).

       01  _removeAnnotations RoutedCommand value new RoutedCommand(
               "RemoveAnnotations", SysType::"GetType"("Barbarian.MainWindow")).
                    
       01  _about RoutedCommand value new RoutedCommand(
               "About", SysType::"GetType"("Barbarian.MainWindow")).
                    
       01  _issueTracker RoutedCommand value new RoutedCommand(
               "IssueTracker", SysType::"GetType"("Barbarian.MainWindow")).

       01  _learnCOBOL RoutedCommand value new RoutedCommand(
               "LearnCOBOL", SysType::"GetType"("Barbarian.MainWindow")).

       procedure division.
       
*          And here are the public read-only properties:
       
           method-id. get property "CompileAndRun" is public.
           procedure division returning result as RoutedCommand.
               set result to _compileAndRun
           end method.
         
           method-id. get property "Export" is public.
           procedure division returning result as RoutedCommand.
               set result to _export
           end method.
         
           method-id. get property "RemoveAnnotations" is public.
           procedure division returning result as RoutedCommand.
               set result to _removeAnnotations
           end method.
         
           method-id. get property "About" is public.
           procedure division returning result as RoutedCommand.
               set result to _about
           end method.
         
           method-id. get property "IssueTracker" is public.
           procedure division returning result as RoutedCommand.
               set result to _issueTracker
           end method.

           method-id. get property "LearnCOBOL" is public.
           procedure division returning result as RoutedCommand.
               set result to _learnCOBOL
           end method.

       end factory.
       end class Commands.
